import Vue from 'vue'
import VueRouter from 'vue-router'
// import Home from '../views/Home.vue'
import HomePage from '../page/HomePage'
import TypePage from '../page/TypePage'
import CartPage from '../page/CartPage'
import AboutPage from '../page/AboutPage'
import LoginPage from '../page/LoginPage'
import SearchPage from '../page/SearchPage'
import DetailPage from '../page/DetailPage'


Vue.use(VueRouter)



const router = new VueRouter({
  routes:[
    {
      path:"/",
      redirect:"/login"
      // component:LoginPage,
    },
    {
      path:'/login',
      component:LoginPage,
      meta:{
        hideBottomBar:true,
        hideTopBar:true
      }
    },
    {
      path:"/home",
      component:HomePage,
      meta:{
        hideShopTag:false,
        hideShopDesc:true
      }
      
    },
    {
      path:"/type",
      component:TypePage,
      meta:{
        hideBottomBar:false,

        hideTopBar:false,
        hideShopTag:false,
        hideShopDesc:true

      }
      
    },
    {
      path:"/cart",
      component:CartPage,
      meta:{
        hideBottomBar:true,
        hideTopBar:true,
      }
      
    },
    {
      path:"/about",
      component:AboutPage,
      meta:{
        hideTopBar:true
      }
      
    },
    {
      path:"/login",
      component:LoginPage,
      
    },
    {
      path:"/search",
      component:SearchPage,
      name:'a',
      meta:{
        hideShopTag:true,
        hideShopDesc:false,
        leftIcon:true

      }
      
    },{
      path:"/detail",
      component:DetailPage,
      meta:{
        hideTopBar:true,
        hideDetailBar:true,
        hideBottomBar:true,
        // hideDetailBottom:true
      }
    }
  ]
})

export default router
